<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>definePrototype</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id="app">
        <button @click.stop="change">change</button>
        <p v-for="item in arr">{{item}}</p>
    </div>
    <script>
        let vm = new Vue({
            el:'#app',
            data:{
                message:'Hello vue',
                arr:[1,2,3],
            },
            methods:{
                change(){
                    this.arr.push(10)
                    // 变异方法  push pop shift unshift splice sort reverse .
                    console.log(this.arr.push);  
                    // 原生方法 
                    console.log(Array.prototype.push) 
                }
            }
        })
    </script>
</body>
</html>